<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var a = ["America", "Greece", "Britain", "Canada", "China", "Egypt"];
			var count = 0;
			for (var i in a) {
				document.write(a[i] + "<br/>");
				console.log(a[i].indexOf("a"));
				console.log(a[i].indexOf("A"));
				console.log(">>>>>>>>>>>>>>>");
				if (a[i].indexOf("a") != -1 || a[i].indexOf("A") != -1)
					count++;
			}
			document.write("共有" + count + "个字符中串包含a或A。");


		</script>
	</head>
	<body>
	</body>
</html>
